Integrand size = 18, antiderivative size = 89 \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=-\frac {a}{d (c+d x)}-\frac {a \cos (e+f x)}{d (c+d x)}-\frac {a f \operatorname {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^2}-\frac {a f \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^2} \]
[Out]
Time = 0.20 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {3398, 3378, 3384, 3380, 3383} \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=-\frac {a f \operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d^2}-\frac {a f \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d^2}-\frac {a \cos (e+f x)}{d (c+d x)}-\frac {a}{d (c+d x)} \]
[In]
[Out]
Rule 3378
Rule 3380
Rule 3383
Rule 3384
Rule 3398
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a}{(c+d x)^2}+\frac {a \cos (e+f x)}{(c+d x)^2}\right ) \, dx \\ & = -\frac {a}{d (c+d x)}+a \int \frac {\cos (e+f x)}{(c+d x)^2} \, dx \\ & = -\frac {a}{d (c+d x)}-\frac {a \cos (e+f x)}{d (c+d x)}-\frac {(a f) \int \frac {\sin (e+f x)}{c+d x} \, dx}{d} \\ & = -\frac {a}{d (c+d x)}-\frac {a \cos (e+f x)}{d (c+d x)}-\frac {\left (a f \cos \left (e-\frac {c f}{d}\right )\right ) \int \frac {\sin \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d}-\frac {\left (a f \sin \left (e-\frac {c f}{d}\right )\right ) \int \frac {\cos \left (\frac {c f}{d}+f x\right )}{c+d x} \, dx}{d} \\ & = -\frac {a}{d (c+d x)}-\frac {a \cos (e+f x)}{d (c+d x)}-\frac {a f \operatorname {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^2}-\frac {a f \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^2} \\ \end{align*}
Time = 0.48 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.88 \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=-\frac {a \left (d (1+\cos (e+f x))+f (c+d x) \operatorname {CosIntegral}\left (f \left (\frac {c}{d}+x\right )\right ) \sin \left (e-\frac {c f}{d}\right )+f (c+d x) \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )\right )}{d^2 (c+d x)} \]
[In]
[Out]
Time = 1.07 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.39
method | result | size |
parts | \(-\frac {a}{d \left (d x +c \right )}+a f \left (-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )\) | \(124\) |
derivativedivides | \(\frac {a \,f^{2} \left (-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )-\frac {a \,f^{2}}{\left (c f -d e +d \left (f x +e \right )\right ) d}}{f}\) | \(143\) |
default | \(\frac {a \,f^{2} \left (-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )-\frac {a \,f^{2}}{\left (c f -d e +d \left (f x +e \right )\right ) d}}{f}\) | \(143\) |
risch | \(-\frac {a}{d \left (d x +c \right )}+\frac {i a f \,{\mathrm e}^{\frac {i \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (i f x +i e +\frac {i \left (c f -d e \right )}{d}\right )}{2 d^{2}}-\frac {i f a \,{\mathrm e}^{-\frac {i \left (c f -d e \right )}{d}} \operatorname {Ei}_{1}\left (-i f x -i e -\frac {i c f -i d e}{d}\right )}{2 d^{2}}-\frac {a \left (-2 d f x -2 c f \right ) \cos \left (f x +e \right )}{2 d \left (d x +c \right ) \left (-d f x -c f \right )}\) | \(156\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.18 \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=-\frac {a d \cos \left (f x + e\right ) - {\left (a d f x + a c f\right )} \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) + {\left (a d f x + a c f\right )} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) + a d}{d^{3} x + c d^{2}} \]
[In]
[Out]
\[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=a \left (\int \frac {\cos {\left (e + f x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \frac {1}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx\right ) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.32 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.20 \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=-\frac {\frac {2 \, a f^{2}}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f} + \frac {{\left (f^{2} {\left (E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{2}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right ) - f^{2} {\left (-i \, E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{2}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )\right )} a}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f}}{2 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 535 vs. \(2 (90) = 180\).
Time = 0.31 (sec) , antiderivative size = 535, normalized size of antiderivative = 6.01 \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=\frac {{\left ({\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} f^{2} \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) - d e f^{2} \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) + c f^{3} \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) - {\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} f^{2} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) + d e f^{2} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) - c f^{3} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) - d f^{2} \cos \left (-\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )}}{d}\right )\right )} a d^{2}}{{\left ({\left (d x + c\right )} d^{4} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d^{5} e + c d^{4} f\right )} f} - \frac {a}{{\left (d x + c\right )} d} \]
[In]
[Out]
Timed out. \[ \int \frac {a+a \cos (e+f x)}{(c+d x)^2} \, dx=\int \frac {a+a\,\cos \left (e+f\,x\right )}{{\left (c+d\,x\right )}^2} \,d x \]
[In]
[Out]